I class="game-tags"> Subject Media
78clips
Katy vs Katy Tompkins
Sep 20, 2026.Houston District
listed by Subject Media
->
`; const signUpForm = `
Create Account

Join GFS.

Set up your account in under a minute. You can upgrade to seller or athlete after.

or use email
I'm here to
Must contain 8 or more characters.
By signing up, you agree to our Terms, Privacy Policy, and NIL Policy.
Already have an account? Sign in
Secured by Clerk
`; // Modal logic function openAuthModal(type) { const overlay = document.getElementById('authModalOverlay'); const content = document.getElementById('authModalContent'); if (!overlay || !content) return; content.innerHTML = type === 'signup' ? signUpForm : signInForm; overlay.style.display = 'flex'; setTimeout(() => { // Add event listeners for modal navigation const openSignUp = document.getElementById('openSignUpModal'); if (openSignUp) openSignUp.onclick = () => openAuthModal('signup'); const openSignIn = document.getElementById('openSignInModal'); if (openSignIn) openSignIn.onclick = () => openAuthModal('signin'); // Account type selector content.querySelectorAll('.type-card').forEach(card => { card.addEventListener('click', () => { content.querySelectorAll('.type-card').forEach(c => c.classList.remove('active')); card.classList.add('active'); }); }); // Sign-in button const signInBtn = document.getElementById('gfsSignInBtnModal'); if (signInBtn) signInBtn.onclick = () => { const email = content.querySelector('input[type=\"email\"]')?.value.trim(); const password = content.querySelector('input[type=\"password\"]')?.value.trim(); if (!email || !password) { signInBtn.textContent = 'Enter email + password'; setTimeout(() => { signInBtn.innerHTML = 'Sign In ->'; }, 1200); return; } window.location.href = 'https://groundfloorsports.com/sign-in?redirect_url=%2Fmarketplace'; }; // Sign-up button const signUpBtn = document.getElementById('gfsSignUpBtnModal'); if (signUpBtn) signUpBtn.onclick = () => { const requiredInputs = Array.from(content.querySelectorAll('input[type=\"text\"], input[type=\"email\"], input[type=\"password\"]')); if (!requiredInputs.every(input => input.value.trim())) { signUpBtn.textContent = 'Complete required fields'; setTimeout(() => { signUpBtn.innerHTML = 'Create Account ->'; }, 1200); return; } const role = content.querySelector('.type-card.active')?.getAttribute('data-role') || 'fan'; const redirectByRole = { fan: '/marketplace', athlete: '/athletes/claim-profile', seller: '/seller' }; const redirectTarget = encodeURIComponent(redirectByRole[role] || '/marketplace'); window.location.href = `https://groundfloorsports.com/sign-up?redirect_url=${redirectTarget}`; }; }, 10); } // Close modal document.addEventListener('click', function(e) { if (e.target && (e.target.id === 'authModalOverlay' || e.target.id === 'closeAuthModal')) { document.getElementById('authModalOverlay').style.display = 'none'; } }); // Add nav buttons if not present window.addEventListener('DOMContentLoaded', function() { let nav = document.querySelector('.main-nav') || document.querySelector('nav') || document.body; if (nav && !document.getElementById('openSignInNavBtn')) { const btn = document.createElement('button'); btn.id = 'openSignInNavBtn'; btn.className = 'stripe-cta-btn'; btn.style.marginLeft = '12px'; btn.textContent = 'Sign In / Sign Up'; btn.onclick = () => openAuthModal('signin'); nav.appendChild(btn); } });